Q.1.        Design a parameterized circuit that have two N-bit un-signed inputs A and B.  The N-bit output Y = |A...

profilem.h.gr

Q.1.        Design a parameterized circuit that have two N-bit un-signed inputs A and B.  The N-bit output Y = |A – B|. Test your circuit with 3 sets of inputs; one with A>B, another with A=B, and another with A<B.

 

 

Q.2.        Use the above module in another module that calculates an 2N-bit output C;

C = |A2 B2| = (A+B) * |A – B|

Instantiate a copy of the module in Q.1. to calculate |A – B| and test this module with the same sets of inputs as in Q.1.

To instantiate a module within another module:

Module_name instance_name #(parameter1 value, parameter 2 value, …) (port1, port2, …) ;

 

e.g. Adder m1 #(8) (A,B,SUM);            //instantiating a module called “Adder” setting the parameter value to 8

 

 

 

    • 10 years ago
    • 10
    Answer(0)
    Bids(0)